# 鼠标悬停-move_to_element()

# 题目：
# 需求：打开注册页面A，模拟鼠标悬停在‘注册’按钮上
import time

from selenium import webdriver
from selenium.webdriver import ActionChains
driver = webdriver.Chrome()
driver.get("http://121.43.169.97:8848/pageA.html")

# 实例化类
action = ActionChains(driver)
# 获取目标元素
xuanting = driver.find_element_by_css_selector("button")
# 在目标元素上执行鼠标悬停功能
action.move_to_element(xuanting).perform()

# 暂停3秒
time.sleep(3)
# 关闭
driver.quit()
